import random
from Base.PublicFunction import OpenBroswer
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
import time

class All_Mamagement():
    def __init__(self):
        self.dr = OpenBroswer.openbrower()
        self.dr.get('http://10.10.10.171:8080/WoniuBoss4.0/login')
        self.dr.find_element_by_name('userName').send_keys('WNCD000')
        self.dr.find_element_by_name('userPass').send_keys('woniu123')
        self.dr.find_element_by_xpath('/html/body/div[1]/div/div/div[2]/button').click()
        self.dr.implicitly_wait(20)

    def findElement(self, locator):
        ele = WebDriverWait(self.dr, 10, 0.1).until(EC.presence_of_element_located(locator))
        return ele
    # def get_home_userame_obj(self):
    #     return self.dr.find_element_by_name('userName')  #用户名
    # def get_home_password_obj(self):
    #     return self.dr.find_element_by_name('userPass')   #密码
    # def get_home_login_obj(self):
    #     return self.dr.find_element_by_xpath('/html/body/div[1]/div/div/div[2]/button')    #登录按钮
    def get_home_student_obj(self):
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[6]/div[1]/a")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[6]/div[1]/a')   #学员管理按钮

    def get_home_stu_info_obj(self):
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[6]/div[2]/div/ul/li[1]/a")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[6]/div[2]/div/ul/li[1]/a') #学员信息

    def get_home_area_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div[1]/select[1]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[1]')   #[区域]下拉框

    def get_home_dire_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div[1]/select[2]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[2]')  #方向下拉框

    def get_home_class_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div[1]/select[3]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[3]')  #班级下拉框

    def get_home_status_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div[1]/select[4]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[4]')  #状态下拉框

    def get_home_stu_name_obj(self):
        locator = (By.NAME, "stuName")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('stuName')    #学生姓名框

    def get_home_search_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div[1]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/button')  #搜索按钮

    def get_home_decode_obj(self):
        locator = (By.XPATH, "//*[@id='btn-decrypt']")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('//*[@id="btn-decrypt"]')  #解密按钮

    def get_home_decode1_obj(self):
        locator = (By.NAME, "secondPass")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('secondPass')   #解密输入二位密码

    def get_home_access_obj(self):
        locator = (By.XPATH, "/html/body/div[10]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[10]/div/div/div[3]/button')  #确认按钮

    def get_home_alter_obj(self):
        locator = (
        By.XPATH, "/html/body/div[7]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr/td[12]/button[2]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[7]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr/td[12]/button[2]')  #修改按钮

    def get_home_edu_obj(self):
        locator = (By.XPATH, "/html/body/div[11]/div/div/form/div/div[3]/div[2]/select")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div/div/form/div/div[3]/div[2]/select')  #学历下拉框

    def get_home_save_obj(self):
        locator = (By.XPATH, "/html/body/div[11]/div/div/div[2]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div/div/div[2]/button')   #保存按钮

    def get_home_access1_obj(self):
        locator = (By.XPATH, "/html/body/div[12]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[12]/div/div/div[3]/button')  #修改完后的确认按钮

    def get_home_close_obj(self):
        return self.dr.close()

    def get_home_staff_name_obj(self):
        locator = (By.NAME, "empName")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('empName')   #员工姓名框

    def get_home_user_name_obj(self):
        locator = (By.NAME, "userName")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('userName')  #用户名框

    def get_home_search1_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/button')    #用户查询按钮

    def get_home_role_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[8]/button[1]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[8]/button[1]')    #角色按钮

    def get_home_addrole_obj(self):
        locator = (By.ID, "role_tree_3_check")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('role_tree_3_check')    #增加角色标识

    def get_home_access2_obj(self):
        locator = (By.ID, "saveSetRole")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('saveSetRole')      #修改保存按钮

    def get_home_access3_obj(self):
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[14]/div/div/div[3]/button')    #再次确认按钮

    def get_home_closedoc_obj(self):
        locator = (By.XPATH, "/html/body/div[12]/div/div/div[1]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[12]/div/div/div[1]/button')   #关闭修改窗口

    def get_home_alterrole_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[8]/button[2]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[8]/button[2]')  #修改按钮

    def get_home_alterrole1_obj(self):
        locator = (By.NAME, "user.des")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('user.des')  #修改用户描述

    def get_home_saveuser_obj(self):
        locator = (By.ID, "saveSetUser")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('saveSetUser')   #保存按钮

    def get_home_alterpwd_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[8]/button[3]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[8]/button[3]')   #重置密码按钮

    def get_home_pwd_obj(self):
        locator = (By.XPATH, "/html/body/div[12]/div/div/form/div/div[2]/div/input")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[12]/div/div/form/div/div[2]/div/input')  #密码框

    def get_home_savepwd_obj(self):
        locator = (By.ID, "saveReset")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('saveReset')      #提交按钮

    def get_home_access4_obj(self):
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[14]/div/div/div[3]/button')   #重置密码确认按钮

    def get_home_access5_obj(self):
        locator = (By.XPATH, "/html/body/div[13]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele

        # return self.dr.find_element_by_xpath('/html/body/div[13]/div/div/div[3]/button')   #修改用户确认按钮

    def get_search(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/button')  #查询按钮

    def get_home_rolesearch_obj(self):
        locator = (By.NAME, "role_name")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('role_name')    #查询角色按钮

    def get_home_role_name_obj(self):
        locator = (By.XPATH, "/html/body/div[11]/div/div/form/div/div[1]/div/input")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div/div/form/div/div[1]/div/input')    #新增角色名框

    def get_home_roleadd_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/button')    #角色新增按钮

    def get_home_save_role_obj(self):
        locator = (By.ID, "saveAddRole")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('saveAddRole')   #角色新增保存

    def get_home_access6_obj(self):
        locator = (By.XPATH, "/html/body/div[12]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[12]/div/div/div[3]/button')    #角色新增确认按钮

    def get_home_alter_role_obj(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[6]/button[2]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[6]/button[2]')  #修改角色按钮

    def get_home_role_alter_obj(self):
        locator = (By.ID, "saveEidtRole")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('saveEidtRole')

    def get_home_system_obj(self):
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[1]/div[1]/a")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[1]/div[1]/a')   #系统管理

    def get_home_system_user_obj(self):
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[1]/div[2]/div/ul/li[1]/a")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[1]/div[2]/div/ul/li[1]/a')  #用户管理

    def get_home_role1_obj(self):
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[1]/div[2]/div/ul/li[2]/a")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[1]/div[2]/div/ul/li[2]/a')   #角色管理

    def get_stu(self):
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr/td[1]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr/td[1]')    #学生姓名

    def get_user(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[2]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[2]')   #用户搜索断言

    def get_teacherdata(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[4]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[4]')   #用户描述断言

    def get_newrole(self):
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[1]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[1]')  #新增角色断言

    def get_role_data(self):
        locator = (By.XPATH, "/html/body/div[7]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr[1]/td[9]")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[7]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr[1]/td[9]')  #修改学历断言


# --------------------------------------------------------------彭振宇

    def get_username_ele(self):                      # 定位用户名
        locator = (By.NAME, "userName")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('userName')

    def get_password_ele(self):                      # 定位密码
        locator = (By.NAME, "userPass")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('userPass')

    def get_verifycode_ele(self):                    # 定位验证码
        locator = (By.NAME, "checkcode")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('checkcode')
    #
    def get_login_button_ele(self):                 # 定位登录按钮
        locator = (By.CLASS_NAME, "btn.btn-primary.btn-block.btn-save")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('btn.btn-primary.btn-block.btn-save')

    def get_teaching_management_ele(self):           # 定位教学管理
        locator = (By.LINK_TEXT, "教学管理")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_link_text("教学管理")

    def get_overtime_apply_ele(self):                # 定位加班申请
        locator = (By.LINK_TEXT, "加班申请")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_link_text('加班申请')

    def get_add_button_ele(self):                    # 定位加班申请中新增按钮
        locator = (By.CLASS_NAME, "btn.btn-primary.btn-padding.pull-right")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('btn.btn-primary.btn-padding.pull-right')

    def get_apply_start_time(self):                 # 定位加班申请开始时间输入框
        locator = (By.NAME, "apply.start_time")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('apply.start_time')

    def get_start_day_ele(self):                         # 定位加班申请开始时间日期选择
        locator = (By.XPATH, "/html/body/div[11]/div[3]/table/tbody/tr[4]/td[3]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath('/html/body/div[11]/div[3]/table/tbody/tr[4]/td[3]')

    def get_start_hour_ele(self):                        # 定位加班申请开始时间小时选择
        locator = (By.XPATH,"/html/body/div[11]/div[2]/table/tbody/tr/td/fieldset[2]/span[4]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[11]/div[2]/table/tbody/tr/td/fieldset[2]/span[4]")

    def get_start_minute_ele(self):                     # 定位加班申请开始时间分钟时间
        locator = (By.XPATH, "/html/body/div[11]/div[1]/table/tbody/tr/td/fieldset/span[2]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[11]/div[1]/table/tbody/tr/td/fieldset/span[2]")

    def get_apply_end_time(self):                    # 定位加班申请结束时间输入框
        locator = (By.NAME, "apply.end_time")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('apply.end_time')

    def get_end_day_ele(self):                      # 定位加班申请结束时间日期选择
        locator = (By.XPATH, "/html/body/div[12]/div[3]/table/tbody/tr[4]/td[3]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath('/html/body/div[12]/div[3]/table/tbody/tr[4]/td[3]')

    def get_end_hour_ele(self):                         # 定位加班申请结束时间小时选择
        locator = (By.XPATH, "/html/body/div[12]/div[2]/table/tbody/tr/td/fieldset[2]/span[6]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[12]/div[2]/table/tbody/tr/td/fieldset[2]/span[6]")

    def get_end_minute_ele(self):                      # 定位加班申请结束时间分钟选择
        locator = (By.XPATH, "/html/body/div[12]/div[1]/table/tbody/tr/td/fieldset/span[2]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[12]/div[1]/table/tbody/tr/td/fieldset/span[2]")

    def get_apply_accounting_way_ele(self):               # 定位加班申请核算方式
        locator = (By.NAME, "apply.accounting_way")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('apply.accounting_way')

    def get_belong_region(self):                       # 定位区域
        locator = (By.NAME, "apply.region_id")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('apply.region_id')

    def get_apply_reason_ele(self):                      # 定位加班原因
        locator = (By.NAME, "apply.reason")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('apply.reason')

    def get_submit_button_ele(self):                   # 定位提交按钮
        locator = (By.ID, "addApplyBtn")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_id('addApplyBtn')

    def get_confirm_button(self):                     # 定位确定按钮
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[14]/div/div/div[3]/button")

    def get_apply_reason_clue(self):                 # 定位申请原因错误提示
        locator = (By.CLASS_NAME, "bootbox-body")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('bootbox-body')

    def get_exit_reason_clue(self):                 # 定位提示退出
        locator = (By.CLASS_NAME, "bootbox-close-button.close")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('bootbox-close-button.close')

    def get_exit_apply(self):                      # 定位申请单退出
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[1]/button/span[1]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath('/html/body/div[14]/div/div/div[1]/button/span[1]')

    def get_apply_table_ele(self):                  # 定位申请表格
        locator = (By.ID, "apply-table")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_id('apply-table')

    def get_on_duty_ele(self):                     # 教师值班
        locator = (By.LINK_TEXT, "教师值班")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_link_text('教师值班')

    def get_assign_work_ele(self):                 # 指定值班
        locator = (By.CLASS_NAME, "btn.btn-primary.btn-padding.pull-right")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('btn.btn-primary.btn-padding.pull-right')

    def get_workman_select_ele(self):            # 定位值班人下拉框
        locator = (By.CLASS_NAME, "sel-text.work_id")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('sel-text.work_id')

    def get_workdata_ele(self):                 # 定位值班日期
        locator = (By.CLASS_NAME, "text.date.form-control.duty_time")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_class_name('text.date.form-control.duty_time')

    def get_date_ele(self):                 # 点击值班日期
        locator = (By.XPATH, "/html/body/div[15]/div[3]/table/tbody/tr[4]/td[3]")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[15]/div[3]/table/tbody/tr[4]/td[3]")

    def get_dutyinfo_save_ele(self):              # 保存值班信息
        locator = (By.XPATH, "/html/body/div[16]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath("/html/body/div[16]/div/div/div[3]/button")

    def get_dutyinfo_confirm_ele(self):        # 值班信息确认
        locator = (By.XPATH, "/html/body/div[16]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath('/html/body/div[16]/div/div/div[3]/button')

    def get_dutyinfo_table_ele(self):         # 定位值班信息表格
        locator = (By.ID, "duty_table")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_id('duty_table')

    def closeBrowser(self):
        self.dr.close()

    def get_sys_management_ele(self):     # 定位系统管理
        locator = (By.LINK_TEXT, "系统管理")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_link_text('系统管理')

    def get_user_management(self):       # 定位用户管理
        locator = (By.LINK_TEXT, "用户管理")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_link_text('用户管理')

    def get_employee_name_ele(self):    # 定位员工姓名输入框
        locator = (By.NAME, "empName")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_name('empName')

    def get_query_button_ele(self):    # 定位查询按钮
        locator = (By.XPATH, "//*[text()='查询']")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_xpath('//*[text()="查询"]')

    def get_sys_emloyee_query_table_ele(self):     # 定位系统管理员工查询结果表格
        locator = (By.ID, "user-table")
        ele = self.findElement(locator)
        return ele
        # return self.driver.find_element_by_id('user-table')
#---------------------------------------------------------------------陈雪

    def findElements(self,locator):
        eles= WebDriverWait(self.dr, 10, 0.1).until(EC.presence_of_all_elements_located(locator))
        return eles

    def close(self):
        self.dr.close()

    def get_humanmange(self): #人事管理-员工管理-新增员工信息
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[12]/div[1]/a")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[12]/div[1]/a') #点击‘人事管理’
    def get_staffinfo(self):
        locator = (By.LINK_TEXT, "员工信息")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_link_text('员工信息') #点击‘员工信息’
    def get_creatbutton(self):
        locator = (By.CLASS_NAME, "btn.btn-primary.btn-padding")
        eles = self.findElements(locator)
        return eles
        # return self.dr.find_elements_by_class_name('btn.btn-primary.btn-padding')

    def get_creatinfo(self,info):
        select_list = Select(self.dr.find_elements_by_name('emp.region_id')[1])
        return select_list.select_by_visible_text(info) #新增员工-区域

    def get_creatempment(self,empment):
        select_list = Select(self.dr.find_elements_by_name('emp.department_id')[1])
        return select_list.select_by_visible_text(empment) #新增员工-部门

    def get_position(self):
        locator = (By.NAME,"emp.position")
        ele= self.findElements(locator)
        return ele
        # return self.dr.find_elements_by_name('emp.position') #职位

    def get_name(self):
        locator = (By.NAME, "emp.employee_name")
        ele = self.findElements(locator)
        return ele
        # return self.dr.find_elements_by_name('emp.employee_name') #输入姓名

    def get_workid(self):
        locator = (By.NAME, "emp.work_id")
        ele = self.findElements(locator)
        return ele
        # return self.dr.find_elements_by_name('emp.work_id') #输入工号

    def get_saving(self):
        locator = (By.ID, "addEmpBtn")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_id('addEmpBtn') #点击保存

    def get_determine(self):
        locator = (By.XPATH, "/html/body/div[16]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[3]/button') #点击确定

    def get_region(self,region):
        select_list = Select(self.dr.find_element_by_id('regionSel'))
        return select_list.select_by_visible_text(region) #页面查询-地区

    def get_dep(self,dep):
        select_list = Select(self.dr.find_element_by_class_name('sel-text.dept'))
        return select_list.select_by_visible_text(dep) #页面查询 -部门

    def get_status(self,status):
        select_list = Select(self.dr.find_element_by_class_name('emp_status.sel-text'))
        return select_list.select_by_visible_text(status) #页面查询-状态

    def get_staffname(self):
        locator = (By.XPATH, "/html/body/div[9]/div[2]/div[1]/input")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('empName') #页面查询-姓名
        #self.dr.find_element_by_xpath('/html/body/div[9]/div[2]/div[1]/input')

    def get_clicks(self):
        locator = (By.CLASS_NAME, "btn.btn-info.btn-padding")
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('btn.btn-info.btn-padding') #点击查询

    def get_table(self):
        locator = (By.ID, "employee-table")
        ele = self.findElement(locator)
        return ele
        # tableobj = self.dr.find_element_by_id('employee-table')
        # tableobj = self.dr.find_element_by_class_name('table.table-hover.table-striped')
        # return tableobj
#-----------------------------------------------------------------孙冉


    def getusername(self):
        locator = (By.NAME, "userName")
        ele = self.findElement(locator)
        return ele

    def getpassword(self):
        locator = (By.NAME, "userPass")
        ele = self.findElement(locator)
        return ele

    def getverifycode(self):
        locator = (By.NAME, "checkcode")
        ele = self.findElement(locator)
        return ele

    def getlogin(self):
        locator = (By.CLASS_NAME, "btn.btn-primary.btn-block.btn-save")
        ele = self.findElement(locator)
        return ele

    def get_login_text(self):
        locator = (By.CLASS_NAME, "welcome")
        ele = self.findElement(locator)
        return ele

    # 登录进去
    def click_jiuye(self):  # 点击就业管理
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[10]/div[1]/a")
        ele = self.findElement(locator)
        return ele

    def click_client(self):  # 点击企业客户
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[10]/div[2]/div/ul/li[4]/a")
        ele = self.findElement(locator)
        return ele

    def click_add_company(self):  # 点击新增企业
        locator = (By.CLASS_NAME, "btn.btn-primary.btn-padding.pull-right")
        ele = self.findElement(locator)
        return ele

    def get_company_name(self):  # 企业名称
        locator = (By.ID, 'newentname')
        ele = self.findElement(locator)
        return ele

    def get_industry(self):  # 输入所属行业
        locator = (By.ID, 'newentcate')
        ele = self.findElement(locator)
        return ele

    def get_address(self):  # 地址
        locator = (By.ID, 'newentaddr')
        ele = self.findElement(locator)
        return ele

    def get_contacts(self):  # 联系人
        locator = (By.ID, 'newentheader')
        ele = self.findElement(locator)
        return ele

    def get_phone(self):  # 电话号码
        locator = (By.ID, 'newtel')
        ele = self.findElement(locator)
        return ele

    def click_add(self):  # 添加的按钮
        locator = (By.XPATH, "/html/body/div[10]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele

    def click_insure(self):  # 确定
        locator = (By.CLASS_NAME, "btn.btn-primary")
        eles = self.findElements(locator)
        return eles

    def read_table_add_company(self):  # 新增完企业的表格    整张表格
        locator = (By.CLASS_NAME, "table.table-hover.table-bordered.table-striped")
        ele = self.findElement(locator)
        return ele

    def serch_table_company(self):  # 查询入职企业的表格
        locator = (By.CLASS_NAME, "table.table-hover.table-bordered.table-striped")
        ele = self.findElement(locator)
        return ele

    def serch_table_clientcompany(self):  # 企业客户的表格
        locator = (By.CLASS_NAME, "table.table-hover.table-bordered.table-striped")
        ele = self.findElement(locator)
        return ele

    # 入职信息
    def click_entry_information(self):
        locator = (By.XPATH, "/html/body/div[4]/div[2]/div[10]/div[2]/div/ul/li[3]/a")
        ele = self.findElement(locator)
        return ele

    def click_select_range(self):  # 区域的下拉框的定位
        locator = (By.ID, "region_id")
        ele = self.findElement(locator)
        return ele

    def click_select_class(self):  # 班级下拉框的定位
        locator = (By.NAME, "stuClass")
        ele = self.findElement(locator)
        return ele

    def click_select_direction(self):  # 方向下拉框的定位
        locator = (By.NAME, "orientation")
        ele = self.findElement(locator)
        return ele

    def click_search_entry_information(self):  # 搜索的定位
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div/div[1]/button[1]")
        ele = self.findElement(locator)
        return ele

    # 新增入职信息
    def click_add_join(self):  # 点击新增
        locator = (
        By.XPATH, "/html/body/div[8]/div[2]/div/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr[1]/td[8]/button[2]")
        ele = self.findElement(locator)
        return ele

    def get_joinposition(self):  # 入职岗位
        locator = (By.XPATH, "/html/body/div[13]/div/div/div[2]/div/div/div/div/div/form/div[1]/select")
        ele = self.findElement(locator)
        return ele

    def get_joindata(self):  # 点击了入职时间
        locator = (By.XPATH, "//*[@id='jdate']")
        ele = self.findElement(locator)
        return ele

    def get_detail_time(self):  # 选择一个时间
        locator = (By.XPATH, "/html/body/div[11]/div[3]/table/tbody/tr[5]/td[4]")
        ele = self.findElement(locator)
        return ele

    def get_salary(self):
        locator = (By.XPATH, "//*[@id='jsalary']")
        ele = self.findElement(locator)
        return ele

    def get_select_company(self):  # 点击选择公司的按钮
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[2]/div/div/div/div/div/form/div[4]/div/button/span[1]")
        ele = self.findElement(locator)
        return ele

    def get_input(self):  # 输入企业名称的框
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[2]/div/div/div/div/div/form/div[4]/div/div/div/input")
        ele = self.findElement(locator)
        return ele

    def click_input(self):
        locator = (
        By.XPATH, "/html/body/div[14]/div/div/div[2]/div/div/div/div/div/form/div[4]/div/div/ul/li[1]/a/span[1]")
        ele = self.findElement(locator)
        return ele

    def click_save(self):  # 保存按钮
        locator = (By.XPATH, "//*[@id='saveEditJBtn']")
        ele = self.findElement(locator)
        return ele

    def click_ensure(self):  # 新增入职信息后的确定
        locator = (By.XPATH, "/html/body/div[14]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele

    def search_table_join_company(self):
        locator = (By.CLASS_NAME, "table.table-hover.table-bordered.table-striped")
        ele = self.findElement(locator)
        return ele



        # 修改企业客户

    def input_name(self):  # 修改企业客户页面的输入企业名称
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/input")
        ele = self.findElement(locator)
        return ele

    def click_sousuo(self):  # 搜索按钮
        locator = (By.XPATH, "/html/body/div[8]/div[2]/div/button[1]")
        ele = self.findElement(locator)
        return ele

    def click_mod(self):  # 修改按钮
        locator = (By.XPATH, "/html/body/div[8]/div[3]/div/div[1]/div[2]/div[2]/table/tbody/tr/td[9]/button")
        ele = self.findElement(locator)
        return ele

    def click_name(self):  # 联系人
        locator = (By.XPATH, "//*[@id='entHeader']")
        ele = self.findElement(locator)
        return ele

    def save_mode(self):  # 修改后保存
        locator = (By.XPATH, "/html/body/div[10]/div/div/div[3]/button")
        ele = self.findElement(locator)
        return ele

    def mod_ensure(self):  # 修改后的确定
        locator = (By.CLASS_NAME, "btn.btn-primary")
        eles = self.findElements(locator)
        return eles

    def get_table_mod(self):  # 获取改后的那个表
        locator = (By.CLASS_NAME, "table.table-hover.table-bordered.table-striped")
        ele = self.findElement(locator)
        return ele

#--------------------------------------------------------------舒慧玲

    def username(self):
        locator = (By.NAME,'userName')
        ele = self.findElement(locator)
        return ele

    def password(self):
        locator = (By.NAME, 'userPass')
        ele = self.findElement(locator)
        return ele

    def veryficode(self):
        locator = (By.CLASS_NAME, 'col-md-6.text.verification')
        ele = self.findElement(locator)
        return ele

    def logion_button(self):  #登录按钮
        locator = (By.CLASS_NAME, 'btn.btn-primary.btn-block.btn-save')
        ele = self.findElement(locator)
        return ele

    def cls_management(self):  #班务管理
        locator = (By.XPATH, '/html/body/div[4]/div[2]/div[8]/div[1]/a')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[8]/div[1]/a')

    def cls_manage(self):  #班级管理
        locator = (By.XPATH, '/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[1]/a')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[1]/a')

    def stu_checking(self):  #学员考勤
        locator = (By.XPATH, '/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[2]/a')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[2]/a')

    def stu_leave(self):  #学院请假
        locator = (By.XPATH, '/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[3]/a')
        ele = self.findElement(locator)
        return ele


    def stu_change(self):  #学员转班
        locator = (By.XPATH, '/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[4]/a')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[4]/div[2]/div[8]/div[2]/div/ul/li[4]/a')

    def add_button(self):  #新增按钮
        locator = (By.CLASS_NAME, 'btn.btn-primary.btn-padding.pull-right')
        ele = self.findElement(locator)
        return ele
        # return  self.dr.find_element_by_class_name('btn.btn-primary.btn-padding.pull-right')

    def cls_num(self):  #班号
        locator = (By.NAME, 'c.class_no')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('c.class_no')

    def direction(self):  #方向
        locator = (By.CLASS_NAME, 'sel-text.stu-orientation')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('sel-text.stu-orientation')

    def start_cls(self):  #开班时间
        locator = (By.CLASS_NAME, 'text.date')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('text.date')

    def start_cls_time(self):  #选择开班时间
        locator = (By.XPATH, '/html/body/div[9]/div[3]/table/tbody/tr[2]/td[1]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[9]/div[3]/table/tbody/tr[2]/td[1]')
    def teacher(self):  #班主任
        locator = (By.NAME, 'c.class_headmaster_id')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('c.class_headmaster_id')

    def save_button(self):  #保存按钮
        locator = (By.XPATH, '/html/body/div[11]/div/div/div[3]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div/div/div[3]/button')

    def button_add1(self):  #新增按钮1    -学员请假
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/div/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/div/button')

    def start_time(self):   #开始时间
        locator = (By.XPATH, '/html/body/div[15]/div/div/div[2]/form/div[1]/div[1]/input')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[15]/div/div/div[2]/form/div[1]/div[1]/input')

    def select_start_time(self):  # 选择开始时间
        locator = (By.XPATH, '/html/body/div[11]/div[3]/table/tbody/tr[5]/td[1]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div[3]/table/tbody/tr[5]/td[1]')

    def end_time(self):   #结束时间
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[1]/div[2]/input')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[1]/div[2]/input')

    def select_end_time(self):  # 选择结束时间
        locator = (By.XPATH, '/html/body/div[12]/div[3]/table/tbody/tr[5]/td[7]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[12]/div[3]/table/tbody/tr[5]/td[7]')

    def type_leave(self):  #请假类型 下拉框
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[2]/div[1]/select')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[2]/div[1]/select')

    def leave_day(self):  #请假天数
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[2]/div[2]/input')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[2]/div[2]/input')

    def stu_name(self):   #学生姓名
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[3]/div/input')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[3]/div/input')

    def stu_name_button(self):   #输入学生姓名 带出来的下拉框
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[3]/div/ul')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[3]/div/ul')

    def deduct(self):    #扣分  下拉框
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[3]/select')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[3]/select')

    def leave_cause(self):  #请假原因
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]/form/div[4]/div/textarea')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]/form/div[4]/div/textarea')

    def save_button1(self):  #保存按钮  -学员请假
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[3]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[3]/button')

    def keepout_view(self):  #防遮挡
        locator = (By.XPATH, '/html/body/div[16]/div/div/div[2]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[16]/div/div/div[2]')

    def region(self):      #区域
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/select[1]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[1]')

    def status_leave(self):  #请假状态
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/select[2]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[2]')

    def leave_stu_name(self): #请假学生姓名
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/input')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/input')

    def select_button(self):  #查询按钮
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/button')

    def leave_cls(self):    #转班按钮
        index = random.randint(2,8)  #实现随机修改
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr['+str(index)+']/td[12]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[2]/div[2]/div[2]/table/tbody/tr['+str(index)+']/td[12]/button')

    def school_region(self): #校区
        locator = (By.NAME, 'changeRegion')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('changeRegion')

    def change_cls(self):  #转班级
        locator = (By.NAME, 'changeClass')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_name('changeClass')

    def accept_button(self):  #确定按钮
        locator = (By.XPATH, '/html/body/div[9]/div/div/div[3]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[9]/div/div/div[3]/button')

    def accept(self):  #二次确定
        locator = (By.XPATH, '/html/body/div[11]/div/div/div[3]/button[2]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div/div/div[3]/button[2]')

    def stu_leave_table(self): #学员请假表
        locator = (By.CLASS_NAME, 'table.table-hover.table-bordered.table-striped')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('table.table-hover.table-bordered.table-striped')

    def stu_change_cls(self):  #学员转班表
        locator = (By.CLASS_NAME, 'fixed-table-container')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('fixed-table-container')

    def change_cls_success(self): #转班成功提示框
        locator = (By.XPATH, '/html/body/div[10]/div/div/div[2]/div')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[10]/div/div/div[2]/div')

    def cls_room(self):  #班级
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/select[2]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/select[2]')

    def search_button(self):  #搜索按钮
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/button')

    def tableObj(self):   #表单对象
        locator = (By.CLASS_NAME, 'table.table-hover.table-bordered.table-striped')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('table.table-hover.table-bordered.table-striped')

    def add_success(self):  #新增班级成功
        locator = (By.XPATH, '/html/body/div[11]/div/div/div[3]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[11]/div/div/div[3]/button')

    def add_button1(self):  #点击确定
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[8]/div[2]/div/div/div/div[1]/button')

    def login_out(self):
        locator = (By.LINK_TEXT, '[注销]')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_link_text('[注销]')

    def add(self):   #新增
        locator = (By.CLASS_NAME, 'btn.btn-primary.btn-padding.pull-right')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_class_name('btn.btn-primary.btn-padding.pull-right')

    def accept1(self):
        locator = (By.XPATH, '/html/body/div[10]/div/div/div[3]/button')
        ele = self.findElement(locator)
        return ele
        # return self.dr.find_element_by_xpath('/html/body/div[10]/div/div/div[3]/button')

    def souso(self):
        locator = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div/div[1]/button')
        ele = self.findElement(locator)
        return ele
        # return self.
